package com.jiaquyun.jcps.mode.manager

import com.jiaquyun.jcps.app.BaseApplication
import com.jiaquyun.jcps.entity.OrderListResponse
import com.jiaquyun.jcps.entity.OrderTabResponse
import com.jiaquyun.jcps.entity.UserInfoResponse
import com.jiaquyun.jcps.mode.BaseManager
import com.jiaquyun.jcps.mode.api.AccessApi
import com.jiaquyun.jcps.mode.api.MainApi
import com.lemlin.network.HttpServiceData
import com.lemlin.network.HttpServiceManager
import com.lemlin.network.HttpServiceSubscribe
import com.lemlin.network.SubscribeListener
import io.reactivex.disposables.Disposable
import retrofit2.http.Query

class MainManager : HttpServiceManager<MainApi>(MainApi::class.java) {


//    /**
//     * 订单列表
//     */
//    fun orderList(
//        lat: String, lng: String, type: String, listener: SubscribeListener<OrderListResponse>
//    ): Disposable =
//        subscribe(
//            apiService.orderList(BaseApplication.userToken(), lat, lng, type),
//            HttpServiceSubscribe(listener)
//        )
//
//    /**
//     * 接单
//     */
//    fun orderReceiving(
//        riderOrderId: String, listener: SubscribeListener<HttpServiceData>
//    ): Disposable =
//        subscribe(
//            apiService.orderReceiving(BaseApplication.userToken(), riderOrderId),
//            HttpServiceSubscribe(listener)
//        )
//
//    /**
//     * 確認取單
//     */
//    fun orderWithdrawal(
//        riderOrderId: String, listener: SubscribeListener<HttpServiceData>
//    ): Disposable =
//        subscribe(
//            apiService.orderWithdrawal(BaseApplication.userToken(), riderOrderId),
//            HttpServiceSubscribe(listener)
//        )
//
//    /**
//     * 确认送达
//     * */
//    fun orderService(
//        riderOrderId: String, listener: SubscribeListener<HttpServiceData>
//    ): Disposable =
//        subscribe(
//            apiService.orderService(BaseApplication.userToken(), riderOrderId),
//            HttpServiceSubscribe(listener)
//        )
//
//    /**
//     *获取订单列表tab
//     * */
//    fun orderListTab(
//        listener: SubscribeListener<OrderTabResponse>
//    ): Disposable =
//        subscribe(
//            apiService.orderListTab(BaseApplication.userToken()),
//            HttpServiceSubscribe(listener)
//        )
}